﻿using System;
using Eneta.Portal.Common;
using Microsoft.SharePoint.WebPartPages;

namespace Eneta.Portal.Forum.WebParts
{
    public class ForumsFrontPageWebPart : WebPart
    {
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            try
            {
                var control = Page.LoadControl("~/_controltemplates/ForumsFrontPageControl.ascx");
                Controls.Add(control);
            }
            catch (Exception ex)
            {
                Logger.LogWarning("CreateChildControls(): Exception when loading ForumsFrontPageControl", GetType().ToString());
                Logger.LogException(ex);
            }
        }
    }
}
